/*
 * @Author: Y先森
 * @Date: 2023-04-28 11:32:18
 * @LastEditors: y && 250048395@qq.com
 * @LastEditTime: 2023-04-28 12:08:28
 * @FilePath: \y-website\src\directives\index.js
 */
/**
 * 全局注册自定指令
 */
export default {
    // 自动注册
    install(app){
        const directives = import.meta.globEager('./modules/*.js')
        for(const [key,value] of Object.entries(directives)){
            const arr = key.split('/')
            const name = arr[arr.length-1].replace('.js','')
            app.directive(name,value.default)
        }
    }
}